import 'package:flutter/material.dart';
import 'listData.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(primarySwatch: Colors.pink),
        home: Scaffold(
          appBar: AppBar(title: Text('布局案例1')),
          body: HomePage(),
        ));
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: <Widget>[
        Container(
          height: 200,
          color: Colors.blue,
          child: Center(
            child: Text('你好Flutter'),
          ),
          margin: EdgeInsets.fromLTRB(0, 0, 0, 10),
        ),
        Row(
          children: <Widget>[
            Expanded(
              flex: 2,
              child: Image.network('https://www.itying.com/images/flutter/2.png',fit: BoxFit.cover,height: 210,),
            ),
            SizedBox(
              width: 10,
            ),
            Expanded(
              flex: 1,
              child: Column(
                children: <Widget>[
                  Image.network('https://www.itying.com/images/flutter/3.png',fit: BoxFit.cover,),
                  SizedBox(
                    height: 10,
                  ),
                  Image.network('https://www.itying.com/images/flutter/4.png',fit: BoxFit.cover,)
                ],
              ),
            )
          ],
        )

      ],
    );
  }
}

